package com.admin.bo;

import com.tiangong.framework.bo.CDO;
import com.tiangong.framework.bo.ITemporalReturn;

/**
 * 返回码和说明枚举类
 */
//TODO 状态码1000-9999
public enum ReturnEnum implements ITemporalReturn {
    //系统

    //业务相关1000-1999
    DEMO_TEXT_1                                                     (1001  ,"系统开小差了，请稍后再试"),
    //业务相关2000-2999

    DEMO_TEXT_2                                                     (2002  ,"系统开小差了，请稍后再试"),

    //业务相关3000-3999
    DEMO_TEXT_3                                                     (3003  ,"系统开小差了，请稍后再试"),





    //补充
    UNDEFINED                                                            (9999  ,"");

    private int code;
    private String msg;
    private Boolean success;

    ReturnEnum(int code, String msg, Boolean success) {
        this.code = code;
        this.msg = msg;
        this.success = success;
    }
    ReturnEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
        this.success = false;
    }

    @Override
    public int getCode() {
        return this.code;
    }

    @Override
    public String getMsg() {
        return this.msg;
    }

    @Override
    public CDO getData() {
        return null;
    }

    @Override
    public Boolean isSuccess() {
        return this.success;
    }
}
